﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeGenerator.DBInfo.entity
{
    /// <summary>
    /// 数据库连接信息对象
    /// </summary>
    public class ConnectionInfo : ICloneable
    {
        /// <summary>
        /// 连接主机
        /// </summary>
        public string Host { get; set; }
        /// <summary>
        /// 连接端口
        /// </summary>
        public uint Port { get; set; }
        /// <summary>
        /// 初始化连接的数据库
        /// </summary>
        public string InitDb { get; set; }
        /// <summary>
        /// 连接用户名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 连接密码
        /// </summary>
        public string Password { get; set; }
        /// <summary>
        /// 数据库类型
        /// </summary>
        public string DBType { get; set; }
        /// <summary>
        /// 连接名称
        /// </summary>
        public string ConnName { get; set; }
        
        /// <summary>
        /// 角色
        /// </summary>
        public string Privilege { get; set; }

        public object Clone()
        {
            return this.MemberwiseClone();
        }
        public ConnectionInfo Copy()
        {
            return Clone() as ConnectionInfo;
        }
    }
}
